<template>
	<view class="container">
		<TopBtn :title="'身份认证'"></TopBtn>
		<view class="info">
			请选择您使用的角色
			<view class="box mt_30 flex-sp-center" @click="act=1">
				<view class="">
					<view class="title">
						我是医生
					</view>
					需上传相关资料和资格证书
				</view>
				<text :class="{'act':act==1}">
					
				</text>
			</view>
			<view class="box box1 mt_30 flex-sp-center" @click="act=2">
				<view class="">
					<view class="title">
						我是药师
					</view>
					需上传相关资料和资格证书
				</view>
				<text :class="{'act':act==2}">
					
				</text>
			</view>
		</view>
		<view class="CommonToolsbtn flex-center-center" @click="updateDoctorInfo()">
			下一步
		</view>
	</view>
</template>

<script>
	import {
		updateDoctorInfo
	} from '@/api/user'
	export default {
		data() {
			return {
				act:''
			};
		},
		methods:{
			updateDoctorInfo() {
				if (!this.act) {
					uni.showToast({
						title: '请选择身份',
						icon: 'none',
						duration: 2000,
					})
					return
				}
				updateDoctorInfo({
					role:this.act
				}).then(res => {
					uni.navigateTo({
						url: `/pages/my/certification/certification`,
					})
				})
			},
		}
	}
</script>

<style lang="less" scoped>
.info{
	padding: 30rpx;
	font-weight: 500;
	font-size: 26rpx;
	color: #999999;
	.box{
		width: 690rpx;
		height: 157rpx;
		background-image: url(@/static/login/ys.png);
		background-size: 100% 100%;
		font-weight: 500;
		font-size: 24rpx;
		color: #999999;
		&>view{
			margin-left: 163rpx;
		}
		.title{
			font-weight: bold;
			font-size: 38rpx;
			color: #333333;
			margin-bottom: 15rpx;
		}
		text{
			width: 30rpx;
			height: 30rpx;
			background: #FFFFFF;
			border-radius: 50%;
			border: 1px solid #EEEEEE;
			margin-right: 21rpx;
		}
		.act{
			background-color: #3B6CFE;
		}
	}
	.box1{
		background-image: url(@/static/login/yaoshi.png);
	}
}
</style>
